package com.mm.cloud.sys.dto.form;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 资源基础信息
 *
 * @author mr
 * @since 2022-11-13
 */
@Data
@Schema(description = "资源基础信息")
public class PermissionDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "路由名称")
    private String name;

    @Schema(description = "资源标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "资源标题不能为空")
    private String title;

    @Schema(description = "资源类型 1-菜单 2-按钮", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "资源类型不能为空")
    private Byte type;

    @Schema(description = "资源图标")
    private String icon;

    @Schema(description = "权限标识")
    private String permissionCode;

    @Schema(description = "顺序", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "顺序不能为空")
    private Integer sort;

    @Schema(description = "请求路径")
    private String path;

    @Schema(description = "组件")
    private String component;

    @Schema(description = "父级ID")
    private Long pid;

    @Schema(description = "平台类型 1-平台管理 2-商城管理")
    @NotNull(message = "平台类型不能为空")
    private Byte platformType;
}
